package developer.核心类.继承多个父类;

/**
 * @author zhangyongkang
 * @time 2025/8/4 20:35
 * @description
 */
public class Demo1 {
    static class Son implements Father1, Father2 {

        @Override
        public void print() {
            Father1.super.print();
            Father2.super.print();
        }
    }

    interface Father1 {
        default void print() {
            System.out.println(1);
        }
    }

    interface Father2 {
        default void print() {
            System.out.println(2);
        }

//      void print();
    }

    public static void main(String[] args) {
        Son son = new Son();
        son.print();
    }
}
